/**
 * Progetto PRAISED.
 * 24/gen/2011
 */
package it.uniroma3.dia.praised.core.model;

import java.util.List;

/**
 * @author Accosta Augusto
 * @author Lopez Elisabetta
 *
 */
public class InputText {

	private String originalTextInput;
	private String parsedTextInput;
	private List<Token> tokenList;
	
	/**
	 * 
	 */
	public InputText(String originalTextInput) {
		this.setOriginalTextInput(originalTextInput);
		this.setParsedTextInput(originalTextInput);
	}
	
	public InputText(String originalTextInput, List<Token> tokenList) {
		this.setOriginalTextInput(originalTextInput);
		this.setParsedTextInput(originalTextInput);
		this.setTokenList(tokenList);
	}
	
	/**
	 * @param originalTextInput the originalTextInput to set
	 */
	public void setOriginalTextInput(String originalTextInput) {
		this.originalTextInput = originalTextInput;
	}

	/**
	 * @return the originalTextInput
	 */
	public String getOriginalTextInput() {
		return this.originalTextInput;
	}

	/**
	 * @param parsedTextInput the parsedTextInput to set
	 */
	public void setParsedTextInput(String parsedTextInput) {
		this.parsedTextInput = parsedTextInput;
	}

	/**
	 * @return the parsedTextInput
	 */
	public String getParsedTextInput() {
		return this.parsedTextInput;
	}

	/**
	 * @param tokenList the tokenList to set
	 */
	public void setTokenList(List<Token> tokenList) {
		this.tokenList = tokenList;
	}

	/**
	 * @return the tokenList
	 */
	public List<Token> getTokenList() {
		return this.tokenList;
	}

	public String toString() {
		StringBuffer bufferToken = new StringBuffer();
		for (Token token : this.getTokenList()) {
			bufferToken.append("<t>" + token.getToken() + "</t> ");
		}
		return this.getOriginalTextInput() + "\t" + this.getParsedTextInput() + "\n[" + bufferToken + "]";
	}
	
}
